﻿using System.Linq.PageList;
using Dyao.Book.Contract;

namespace Dyao.Book.Application.Abstractions
{
    public interface IChapterMgrApplication
    {
        /// <summary>
        /// 分页获取章节信息
        /// </summary>
        /// <param name="pageFilter">分页筛选器</param>
        /// <param name="cancellationToken">取消操作的通知</param>
        /// <returns>章节信息</returns>
        Task<IPageList<ChapterResultDto>> GetPageListAsync(IPageFilter<ChapterFilterDto> pageFilter, CancellationToken cancellationToken = default);

        /// <summary>
        /// 修改章节信息
        /// </summary>
        /// <param name="chapterInfo">章节信息</param>
        /// <param name="cancellationToken">取消操作的通知</param>
        /// <returns></returns>
        Task<string> ModifyAsync(ChapterInfoDto chapterInfo, CancellationToken cancellationToken = default);

        /// <summary>
        /// 删除操作
        /// </summary>
        /// <param name="chapterId">编号</param>
        /// <param name="cancellationToken">取消操作的通知</param>
        /// <returns></returns>
        Task<string> DeleteAsync(string chapterId, CancellationToken cancellationToken = default);
    }
}
